﻿/** 
 * Copyright / Licence
 * <p>
 * You are free:
 * <li>to Share — to copy, distribute and transmit the work
 * <li>to Remix — to adapt the work
 * </p>
 * <p>
 * Under the following conditions:
 * <li>Attribution — You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
 * <li>Noncommercial — You may not use this work for commercial purposes.
 * <li>Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.
 * </p>
 * <p>
 * More information can be found here:
 * <br/>
 * http://creativecommons.org/licenses/by-nc-sa/3.0/
 * </p>
 * <p>
 * Please contact Manfred Weber [manfred.weber@gmail.com] if you require a commercial licence
 * </p>
 */
 package org.dschini.ui.maps.world {

	import flash.events.*;
	import flash.display.*;
	import org.dschini.data.ui.maps.*;
	import org.dschini.data.ui.maps.world.*;
	import org.dschini.data.ui.maps.world.asia.*;
	import org.dschini.ui.maps.*;
	import org.dschini.ui.maps.world.*;
	import org.dschini.ui.maps.world.asia.*;

	public class AsiaMap extends Map
	{
		public var asiaMapCountryLines:MovieClip;
		
		public var nepalMap:NepalMap;
		public var eastRussianMap:EastRussiaMap;
		public var northKoreaMap:NorthKoreaMap;
		public var southKoreaMap:SouthKoreaMap;
		public var japanMap:JapanMap;
		public var taiwanMap:TaiwanMap;
		public var philippinesMap:PhilippinesMap;
		public var indonesiaMap:IndonesiaMap;
		public var vietnamMap:VietnamMap;
		public var sriLankaMap:SriLankaMap;
		public var indiaMap:IndiaMap;
		public var jammuAndKashmirMap:JammuAndKashmirMap;
		public var bhutanMap:BhutanMap;
		public var bangladeshMap:BangladeshMap;
		public var thailandMap:ThailandMap;
		public var malaysiaMap:MalaysiaMap;
		public var cambodiaMap:CambodiaMap;
		public var burmaMap:BurmaMap;
		public var laosMap:LaosMap;
		public var chinaMap:ChinaMap;
		public var mongoliaMap:MongoliaMap;
		public var eastKazakhstanMap:EastKazakhstanMap;
		public var yemenMap:YemenMap;
		public var cyprusMap:CyprusMap;
		public var omanMap:OmanMap;
		public var unitedArabEmiratesMap:UnitedArabEmiratesMap;
		public var kuwaitMap:KuwaitMap;
		public var saudiArabiaMap:SaudiArabiaMap;
		public var kyrgyzstanMap:KyrgyzstanMap;
		public var uzbekistanMap:UzbekistanMap;
		public var tajikistanMap:TajikistanMap;
		public var pakistanMap:PakistanMap;
		public var afghanistanMap:AfghanistanMap;
		public var turkmenistanMap:TurkmenistanMap;
		public var iranMap:IranMap;
		public var iraqMap:IraqMap;
		public var nakhchivanMap:NakhchivanMap;
		public var armeniaMap:ArmeniaMap;
		public var azerbaijanMap:AzerbaijanMap;
		public var georgiaMap:GeorgiaMap;
		public var gazaStripMap:GazaStripMap;
		public var westBankMap:WestBankMap;
		public var syriaMap:SyriaMap;
		public var israelMap:IsraelMap;
		public var lebanonMap:LebanonMap;
		public var jordanMap:JordanMap;
		public var eastTurkeyMap:EastTurkeyMap;

		public function AsiaMap():void
		{
			countries = [
					nepalMap,
					eastRussianMap,
					northKoreaMap,
					southKoreaMap,
					japanMap,
					taiwanMap,
					philippinesMap,
					indonesiaMap,
					vietnamMap,
					sriLankaMap,
					indiaMap,
					jammuAndKashmirMap,
					bhutanMap,
					bangladeshMap,
					thailandMap,
					malaysiaMap,
					cambodiaMap,
					burmaMap,
					laosMap,
					chinaMap,
					mongoliaMap,
					eastKazakhstanMap,
					yemenMap,
					cyprusMap,
					omanMap,
					unitedArabEmiratesMap,
					kuwaitMap,
					saudiArabiaMap,
					kyrgyzstanMap,
					uzbekistanMap,
					tajikistanMap,
					pakistanMap,
					afghanistanMap,
					turkmenistanMap,
					iranMap,
					iraqMap,
					nakhchivanMap,
					armeniaMap,
					azerbaijanMap,
					georgiaMap,
					gazaStripMap,
					westBankMap,
					syriaMap,
					israelMap,
					lebanonMap,
					jordanMap,
					eastTurkeyMap
			]
		}
		
		override public function set mouseEnabled( mouseEnabled:Boolean ):void
		{
			super.mouseEnabled = mouseEnabled;
			for(var i:int=0; i<countries.length; i++){
				Map(countries[i]).mouseEnabled = mouseEnabled;
			}
		}
		
		override public function set doubleClickEnabled( doubleClickEnabled:Boolean ):void
		{
			super.doubleClickEnabled = doubleClickEnabled;
			for(var i:int=0; i<countries.length; i++){
				Map(countries[i]).doubleClickEnabled = doubleClickEnabled;
			}
		}
		
		override public function set data( data:MapData ):void
		{
			_data = data;
			for(var i:int=0; i<countries.length; i++){
				countries[i].data = MapData(_data).countries[i];
			}
		}
		
		override public function render():void
		{
			asiaMapCountryLines.visible = data.countryLinesVisible ? true : false;
			if( data.countryLinesColorTransform ){
				asiaMapCountryLines.transform.colorTransform = data.countryLinesColorTransform;
			}
			for(var i:int=0; i<countries.length; i++){
				countries[i].render();
			}
		}
	}
}
